<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        window.onload = function () {
            let a = prompt("请出拳【0-剪刀 1-石头 2-布】").valueOf();
            let b = Math.round(Math.random()*2);

            if (a-b===1||b-a===2){
                alert("我靠，你居然赢了！~")
            }
            if (a-b===0){
                alert("诶唷，打成平手！~")
            }
            if (b-a===1||a-b===2){
                alert("不是吧，你居然输了！~")
            }

            let MC = document.getElementById("MC");
            MC.src = "../1.1.5img/"+a+".jpg"

            let DN = document.getElementById("DN");
            DN.src = "../1.1.5img/"+b+".jpg"



        }
    </script>
</head>
<body>
玩家出拳：<img src="" alt="" id="MC">
<br>

电脑出拳：<img src="" alt="" id="DN">
</body>
</html>